package ExperimentThree.Adapter;

/**
 * @author 北巷_东坡
 * @date 2022/11/13 12:11
 * @computer 10741
 */
public class BinarySearch206 {
    public void binarySearch(int[] list,int key) {
        // 调用java.util.Arrays的binarySearch二分查找方法
        String m;
        m = String.valueOf(java.util.Arrays.binarySearch(list, key));
       if (m != null){
           System.out.print("找到关键字"+key);
       }
       else {
           System.out.print("没有找到关键字" + key);
       }
    }
}
